package cn.donting.jme.edit.project;

import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;

import java.io.IOException;
import java.net.URL;

/**
 * 项目管理gui
 */
public class ProjectGuide extends Application {
    @Override
    public void start(Stage primaryStage) throws Exception {
        AnchorPane root = FXMLLoader.load(getClass().getResource("./ProjectGuide.fxml"));

        Scene scene = new Scene(root, 300, 275);
        primaryStage.setTitle("FXML Welcome");
        primaryStage.setScene(scene);
        primaryStage.show();
    }

    @FXML
    public void openProject(ActionEvent actionEvent) throws IOException {
        Stage stage = new Stage();
        URL resource1 = this.getClass().getClassLoader().getResource("cn/donting/jme/edit/project/ProjectGuide.fxml");
        URL resource = this.getClass().getClassLoader().getResource("cn/donting/jme/edit/ui/Edit.fxml");
        String s = resource1.toString();
        System.out.println(s);

        BorderPane root = FXMLLoader.load(this.getClass().getClassLoader().getResource("cn/donting/jme/edit/run/ui/Edit.fxml"));
        Scene scene = new Scene(root, 500, 400);
        stage.setTitle("FXML Welcome");
        stage.setScene(scene);
        stage.show();
    }
    public static void main(String[] args) {
        ProjectGuide.launch(args);
    }
}
